package com.gton.controller;

import com.gton.annotation.SwaggerScanClass;
import com.gton.io.Resp;
import com.gton.service.GotoThirdSysRouterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @description:
 * @author: GuoTong
 * @createTime: 2022-09-24 14:37
 * @since JDK 1.8 OR 11
 **/
@RestController
@Api(tags = "测试接口2")
@Slf4j
@SwaggerScanClass
public class HelloController2 {

    @Autowired
    private GotoThirdSysRouterService gotoThirdSysRouterService;

    @RequestMapping(value = "/GotoThirdSysRouterService", method = RequestMethod.GET)
    @ApiOperation(value = "hello2", notes = "json格式")
    @ApiResponse(code = 200, message = "返回的是json格式", response = Resp.class)
    public Resp hello(HttpServletRequest request) {
        log.info("Rest 远程调用ThirdSysRouter ");
        return gotoThirdSysRouterService.getThirdSysRouterService_Hello();
    }
}
